package com.powernode.spring6.service;

import com.powernode.spring6.dao.UserDao;
import com.powernode.spring6.dao.VipDao;

public class UserService {
    private UserDao userDao;
    private VipDao vipDao;
    //set注入的话，必须提供一个set方法
    //Spring容器会调用这个set方法，来给userDao属性赋值

    public void setVipDao(VipDao vipDao) {
        this.vipDao = vipDao;
    }
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
    public void saveUser(){
        vipDao.insert();
        userDao.insert();
    }
}
